#pragma once

#pragma unmanaged

#include <BWSAL\DefenseManager.h>

#pragma managed

#include "..\AiBase.h"
#include "Interfaces\IDefenseManager.h"
#include "Interfaces\IUnitArbitrator.h"
#include "Interfaces\IBorderManager.h"

using namespace BroodWar;

namespace BroodWar
{
	namespace Addon
	{
		ref class BorderManager;

		public ref class DefenseManager : public AiBase, IDefenseManager
		{
		internal:
			BWSAL::DefenseManager* instance;

			DefenseManager(BWSAL::DefenseManager* manager);
			~DefenseManager();
			!DefenseManager();

			static DefenseManager^ s_instance;
		public:
			static void Create(IUnitArbitrator^ arbirtator, IBorderManager^ borderManager);
			static property DefenseManager^ Instance { DefenseManager^ get(); }

			virtual void OnOffer(IEnumerable<Unit^>^ units);
			virtual void OnRevoke(Unit^ unit, double bid);
			virtual void OnFrame() override;
			virtual property String^ Name { String^ get(); }
		};
	}
}
